package com.huarui.quotation.dao;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.IBaseDao;

import com.huarui.quotation.model.Quotation;

public interface IQuotationDao extends IBaseDao {

	/**
	 * 根据来源和名称查找报价信息
	 * 
	 * @param source
	 *            来源
	 * @param name
	 *            名称
	 * @return
	 */
	public List<Map<String, String>> getQuotationsByName(Integer source,
			String name);

	/**
	 * 根据编码查找报价信息
	 * 
	 * @param source
	 *            来源
	 * @param code
	 *            编码
	 * @return
	 */
	public List<Map<String, String>> getQuotationsByCode(Integer source,
			String code);

	/**
	 * 根据复杂条件查找报价信息
	 * 
	 * @param map
	 * @return
	 */
	public List<Map<String, String>> getQuotationsByComplexCond(
			Map<String, String> map);

	public Integer getQuotaCountInfo(Map<String, Object> map);

//	List<Map<String, Object>> getQuotationListByComplex(Map<String, Object> map);

	public void batchInsertQuotation(List<Quotation> quotations);

	@SuppressWarnings("unchecked")
	public Quotation getQuotationByInventoryId(Map map);

	public void bacthUpdatQuotation(List<Quotation> quotations);
	
	/**
	 * 搜索零件报价信息
	 * @author ycf
	 * @param paramsMap
	 * @return
	 */
	public List<Map<String, Object>> searchQuotationByComplex(Map<String, Object> paramsMap);
	
	/**
	 * 搜索首页零件报价信息
	 * @param paramsMap
	 * @return
	 */
	public List<Map<String, Object>> searchFirstPageQuotationByComplex(Map<String, Object> paramsMap);
	
	/**
	 * 搜索零件报价信息总数量
	 * @author ycf
	 * @param paramsMap
	 * @return
	 */
	public Integer searchQuotationCountByComplex(Map<String, Object> paramsMap);
	
	/**
	 *btach insert
	 * @author ycf
	 * @param paramsMap
	 * @return
	 */
	public boolean batchInsertQuotation(final List<Quotation> quotations,final Integer companyId);
	
	public void bacthUpdatQuotation(List<Quotation> quotations,final Integer companyId);
	
	public boolean createPassPermission(Quotation quotation,final Integer companyId);
	
	public List<Quotation> getListByConditions(Map<String,Object> map);
	
	public boolean validateInsertPermisstion(Integer companyId);
	
	public void batchDeleteQuotation(List<Quotation> quotations);
	
}
